package runtime

import "unsafe"

type hmap struct {
	count     int            // 当前保存的元素个数
	B         uint8          // 指示bucket数组的大小
	noverflow uint16         // approximate number of overflow buckets; see incrnoverflow for details
	hash0     uint32         // hash seed
	buckets   unsafe.Pointer // bucket数组指针，数组的大小为2^B, may be nil if count==0  (B=2时,buckets 大小为四个的数组指针)

	oldbuckets unsafe.Pointer // previous bucket array of half the size, non-nil only when growing
	nevacuate  uintptr        // progress counter for evacuation (buckets less than this have been evacuated)

	// bucket 哈希桶
}

type bmap struct {
	tophash [8]uint8 //存储哈希值的高8位
	// 八个键值对
	//data    byte[1]  //key value数据:key/key/key/.../value/value/value...
	overflow *bmap //溢出bucket的地址
}

// hash取数过程
//
